home *** CD-ROM | disk | FTP | other *** search
- function Drow()
- {
- if(i % gs == 0)
- {
- _parent.shadows.duplicateMovieClip("rw" + i,i);
- _parent["rw" + i]._x = _X;
- _parent["rw" + i]._y = _Y;
- _parent["rw" + i]._xscale = _xscale;
- _parent["rw" + i].gotoAndStop(_currentframe);
- _parent["rw" + i].ru.gotoAndStop(ru._currentframe);
- _parent["rw" + i].onEnterFrame = function()
- {
- if(_parent.moveL == true and _parent.moveR == false)
- {
- this._x -= _parent.movspd;
- }
- else if(_parent.moveR == true and _parent.moveL == false)
- {
- this._x += _parent.movspd;
- }
- this._alpha -= 10;
- if(this._alpha <= 0)
- {
- this.removeMovieClip();
- }
- };
- }
- i++;
- }
- stop();
- _parent.movlock = false;
- this.swapDepths(100000);
- gs = 5;
- onEnterFrame = function()
- {
- if(_parent.pauses == false and _parent.end == false)
- {
- setBrightOffset(_parent.a);
- if(_parent.ability == "speed")
- {
- Drow();
- }
- if(this.behit == true)
- {
- this._alpha = 50;
- this.hit_i = this.hit_i + 1;
- if(this.hit_i >= 45)
- {
- this.hit_i = 0;
- this._alpha = 100;
- behit = false;
- }
- }
- if(_parent.manHp <= 0)
- {
- delete onEnterFrame;
- _parent.movlock = true;
- this.gotoAndPlay("死亡");
- }
- var _loc5_ = 0;
- while(_loc5_ < _parent.item_array.length)
- {
- var _loc4_ = _parent.land[_parent.item_array[_loc5_]];
- if(this.hitfk.hitTest(_loc4_))
- {
- delete _loc4_.onEnterFrame;
- _loc4_.play();
- }
- _loc5_ = _loc5_ + 1;
- }
- _loc5_ = 0;
- while(_loc5_ < _parent.enemy_array.length)
- {
- var _loc3_ = _parent.land[_parent.enemy_array[_loc5_]];
- if(zhongquan.hitTest(_loc3_.atkfk))
- {
- if(_loc3_.namess == "boss")
- {
- _loc3_.gotoAndPlay("hit");
- }
- else
- {
- _parent.hiten.start();
- delete _loc3_.onEnterFrame;
- _loc3_.gotoAndPlay("重拳");
- }
- }
- if(jiguang.hitTest(_loc3_.atkfk) and _loc3_.fired != true)
- {
- if(_loc3_.namess == "boss")
- {
- _loc3_.gotoAndPlay("hit");
- }
- else
- {
- delete _loc3_.onEnterFrame;
- _loc3_.gotoAndPlay("bomb");
- }
- }
- if(xiqi.hitTest(_loc3_.atkfk))
- {
- if(_loc3_.namess != "boss")
- {
- delete _loc3_.onEnterFrame;
- _loc3_.gotoAndPlay("xi");
- }
- }
- if(this.fk.hitTest(_loc3_.fk) and _parent.yinc > 0 and _loc3_.noLife != true and _parent.flyNow == false)
- {
- _parent.yinc = -10;
- _parent.inAir = true;
- if(_loc3_.names != "songshu")
- {
- delete _loc3_.onEnterFrame;
- }
- _loc3_.gotoAndPlay("hit");
- }
- else if(this.hitfk.hitTest(_loc3_.atkfk) and this.behit == false and _parent.manHp > 0)
- {
- _parent.manHp -= 1;
- _parent.hit_s.start();
- _parent.canjump = false;
- this.behit = true;
- breathed = false;
- _parent.movlock = false;
- _parent.yinc = -10;
- _parent.inAir = true;
- if(this._xscale == 100)
- {
- this._x -= 30;
- }
- else
- {
- this._x += 30;
- }
- }
- _loc5_ = _loc5_ + 1;
- }
- if(_parent.movlock == false)
- {
- if(Key.isDown(37))
- {
- prs._xscale = -100;
- this._xscale = -100;
- rDown = false;
- lDown = true;
- if(!_parent.inAir and _parent.flyNow == false)
- {
- if(_parent.spdNow == false)
- {
- this.gotoAndPlay("Φ╡░");
- }
- else
- {
- this.gotoAndPlay("加速");
- }
- }
- }
- else
- {
- lDown = false;
- }
- if(Key.isDown(39))
- {
- prs._xscale = 100;
- this._xscale = 100;
- lDown = false;
- rDown = true;
- if(!_parent.inAir and _parent.flyNow == false)
- {
- if(_parent.spdNow == false)
- {
- this.gotoAndPlay("Φ╡░");
- }
- else
- {
- this.gotoAndPlay("加速");
- }
- }
- }
- else
- {
- rDown = false;
- }
- if(Key.isDown(40) and !_parent.inAir and _parent.flyNow == false and lDown == false and rDown == false)
- {
- gotoAndStop("Φ╣▓");
- }
- if(!Key.isDown(40) and duck == true)
- {
- gotoAndStop("τ½Ö");
- duck = false;
- }
- if(this.finish == true and _parent.inAir == false)
- {
- this.gotoAndPlay("finish");
- }
- else if(this.finish == true and _parent.flyNow == true)
- {
- _parent.tMax = 0;
- }
- if(Key.isDown(83) and _parent.ability != null and _parent.flyNow == false and _parent.spdNow == false and finish == false)
- {
- prs._visible = false;
- if(_parent.ability == "power")
- {
- _parent.s_hit.start();
- _parent.movlock = true;
- this.gotoAndPlay("重拳");
- }
- else if(_parent.ability == "breath")
- {
- _parent.movlock = true;
- this.gotoAndPlay("吸气");
- }
- else if(_parent.ability == "eye")
- {
- _parent.movlock = true;
- this.gotoAndPlay("激光");
- }
- }
- if(_parent.ability == "fly" and finish == false and stopFly == false)
- {
- this.gotoAndStop("Θú₧Φíî");
- _parent.flyNow = true;
- _parent.inAir = true;
- }
- if(_parent.ability == "speed" and finish == false)
- {
- _parent.spdNow = true;
- if(inAir == false)
- {
- this.gotoAndStop("加速");
- }
- }
- if(_parent.ability == "fly" and stopFly == true)
- {
- if(_parent.inAir == false)
- {
- prs._visible = true;
- prs._xscale = this._xscale;
- }
- if(Key.isDown(83) and _parent.inAir == false)
- {
- prs._visible = false;
- this.gotoAndStop("Θú₧Φíî");
- _parent.flyNow = true;
- _parent.inAir = true;
- stopFly = false;
- }
- }
- if(_parent.ability == "fly" and _parent.flyNow == true)
- {
- if(Key.isDown(65) and aLock == false)
- {
- _parent.yinc = -15;
- this.gotoAndPlay("Φ╖│");
- _parent.flyNow = false;
- stopFly = true;
- }
- if(Key.isDown(38) and this._y > 80)
- {
- this._y -= 5;
- }
- else if(Key.isDown(40) and this._y < 450)
- {
- dDown = true;
- this._y += 5;
- }
- else if(!Key.isDown(40))
- {
- dDown = false;
- }
- }
- if(Key.isDown(65))
- {
- aLock = true;
- }
- else
- {
- aLock = false;
- }
- if(_parent.ability != "fly")
- {
- dDown = false;
- }
- if(_parent.ability != "fly" and _parent.flyNow == true)
- {
- _parent.flyNow = false;
- this._y -= 10;
- this.gotoAndPlay("Φ╖│");
- }
- if(_parent.ability == "speed" and _parent.spdNow == true)
- {
- _parent.movspd = 10;
- }
- if(_parent.ability != "speed" and _parent.spdNow == true)
- {
- _parent.spdNow = false;
- _parent.movspd = 5;
- this.gotoAndPlay("τ½Ö");
- }
- }
- if(breathed == true and _parent.ability == "breath" and finish == false)
- {
- if(Key.isDown(83))
- {
- this.play();
- }
- }
- }
- };
-